<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑公告</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link th:href="@{static/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link th:href="@{static/css/font-awesome.css}" href="../static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link th:href="@{static/css/plugins/iCheck/custom.css}" href="../static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link th:href="@{static/css/animate.css}" href="../static/css/animate.css" rel="stylesheet">
    <link th:href="@{static/css/style.css}" href="../static/css/style.css?v=4.1.0" rel="stylesheet">
    <link th:href="@{static/css/plugins/sweetalert/sweetalert.css}" href="../static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
</head>
<body>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>编辑公告</h5>
                    </div>
                    <div class="ibox-content">

                        <div class="table-responsive">
                            <table th:switch="${pageBean.list ne null and pageBean.list.size() gt 0}"
                                   class="table table-striped">
                                <thead>

                                <tr>
                                    <th>ID</th>
                                    <th>标题</th>
                                    <th>发布人</th>
                                    <th>发布日期</th>
                                    <th shiro:hasPermission="1">操作</th>
                                </tr>
                                </thead>
                                <tbody th:case="true">
                                <tr th:each="item:${pageBean.list}">
                                    <td th:text="${item.id}">1</td>
                                    <td th:text="${item.title}">蓝溪郡</td>
                                    <td th:text="${item.writer}">蓝溪郡</td>
                                    <td th:text="${item.publishTime}">蓝溪郡</td>
                                    <td>
<!--                                        <button shiro:hasPermission="1"class="btn btn-xs btn-primary" th:onclick="|deleteCategory(${item.id})|">删除</button>-->
                                        <button shiro:hasPermission="1"class="btn btn-xs btn-danger"
                                                data-toggle="modal"
                                                data-target="#updateApartmentModal" th:onclick="|update()|">更新</button>
                                    </td>
                                </tr>
                                <tbody th:case="false">
                                <tr>
                                    <td>暂无数据</td>
                                    <td>暂无数据</td>
                                    <td>暂无数据</td>
                                    <td>暂无数据</td>
                                    <td>暂无数据</td>
                                </tr>
                                </tbody>
                                </tbody>
                            </table>
                            <div class="pull-right">
                                <script type="text/javascript">
                                    function page(currentPage) {
                                        window.location.href = getRootPath() + "/anno?currentPage="
                                            + currentPage;
                                    }
                                </script>
                                <div class="pull-right" th:replace="share/page :: page">
                                    <ul class="pagination">
                                        <li>
                                            <a href="#" aria-label="Previous">
                                                <span aria-hidden="true">&laquo;</span>
                                            </a>
                                        </li>
                                        <li><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li>
                                            <a href="#" aria-label="Next">
                                                <span aria-hidden="true">&raquo;</span>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<<div class="modal inmodal" id="updateApartmentModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated fadeIn">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h6 class="modal-title">修改公告</h6>
            </div>
            <div class="modal-body col-sm-12">
                <form class="form-horizontal" method="post" onsubmit="return updateById(this)">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">公告标题</label>
                        <div class="col-sm-10">
                            <input type="text" placeholder="请输入公告标题" class="form-control" name="title" id="title">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">公告内容</label>
                        <div class="col-sm-10">
                            <textarea name="content" id="content" placeholder="请输入公告内容" rows="10" class="form-control"></textarea>
                            <!--                            <input type="text" th:rows="10" name="content" id="content" placeholder="请输入公告内容" class="form-control">-->
                        </div>
                    </div>
                    <div class="modal-footer">
                        <input type="hidden" id="id" name="id">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-primary" id="save" >
                            保存
                        </button>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>


<!-- 全局js -->
<script th:src="@{static/js/jquery.min.js}" src="../static/js/jquery.min.js?v=2.1.4"></script>
<script th:src="@{static/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js?v=3.3.6"></script>


<!-- Peity -->
<script th:src="@{static/js/plugins/peity/jquery.peity.min.js}" src="../static/js/plugins/peity/jquery.peity.min.js"></script>

<!-- 自定义js -->
<script th:src="@{static/js/content.js}" src="../static/js/content.js?v=1.0.0"></script>


<!-- iCheck -->
<script th:src="@{static/js/plugins/iCheck/icheck.min.js}" src="../static/js/plugins/iCheck/icheck.min.js"></script>

<script th:src="@{static/script/base.js}" src="../static/script/base.js"></script>

<script th:src="@{static/script/tips.js}" src="../static/script/tips.js"></script>

<script th:src="@{static/script/anno.js}" src="../static/script/anno.js"></script>

<script th:src="@{static/js/plugins/sweetalert/sweetalert.min.js}" src="../static/js/plugins/sweetalert/sweetalert.min.js"></script>
</body>
</html>